package com.smartfactory.sail.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartfactory.sail.entity.StorageCurrentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 仓库当前情况/每种物品总情况 Mapper 接口
 * </p>
 *
 * @author 王巨壁
 * @since 2019-08-07
 */
@Mapper
public interface StorageCurrentInfoMapper extends BaseMapper<StorageCurrentInfo> {

    Integer getStorageCurrentSize(@Param("ew") Wrapper<StorageCurrentInfo> queryWrapper);

    public List<StorageCurrentInfo> getItemCurrentSize(Long orderId);

    StorageCurrentInfo getByItemId(@Param("itemId")Long itemId, Integer storageType);
    StorageCurrentInfo getItemSize(@Param("itemId")Long itemId);

    boolean updateMaterialSize(@Param("materialId")Long materialId,@Param("size")Integer size);
}
